package com.jobjoin.jobjoin.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author WinsomeC
 * @since 2021-04-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="User对象", description="用户表")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "编号")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private Integer id;

    @ApiModelProperty(value = "创建人编号")
    private Integer creatorid;

    @ApiModelProperty(value = "用户名")
    private String name;

    @ApiModelProperty(value = "创建日期")
    private Date createdate;

    @ApiModelProperty(value = "创建人姓名")
    private String creatorname;

    @ApiModelProperty(value = "账号状态 0正常 1审核中 2被否决 -1已删除 ")
    @TableLogic
    private Integer status;

    @ApiModelProperty(value = "系统角色 0管理员 1企业 2求职者")
    private Integer role;

    @ApiModelProperty(value = "首次登陆时间")
    private Date firstlogin;

    @ApiModelProperty(value = "末次登陆时间")
    private Date lastlogin;

    @ApiModelProperty(value = "登陆密码")
    private String password;

    @ApiModelProperty(value = "机器号")
    private String sn;

    @ApiModelProperty(value = "是否在线")
    private Boolean onlinflag;

    @ApiModelProperty(value = "应该放在redis里")
    private String token;

    @ApiModelProperty(value = "更新时间")
    private Date updatedate;


}
